package com.luoke.handler;

import com.luoke.constant.SubmoduleTypeConstant;
import com.luoke.result.Result;
import com.luoke.service.BattleRoundResponseService;
import com.luoke.service.impl.BattleRoundResponseServiceImpl;
import org.java_websocket.WebSocket;

public class BattleRoundResponseHandler {

    private BattleRoundResponseService battleRoundResponseService = new BattleRoundResponseServiceImpl();


    public void handler(WebSocket conn, Result result) {
        if (result.getCommand().equals(SubmoduleTypeConstant.PET_CHOOSE)) {
            battleRoundResponseService.firstPetChoose(conn,result);
        }else if (result.getCommand().equals(SubmoduleTypeConstant.BAG)){
            battleRoundResponseService.getBag(conn, result);
        } else if (result.getCommand().equals(SubmoduleTypeConstant.OPPONENT_ROUND_COMPLETED)) {
            battleRoundResponseService.turnAurond(conn, result);
        }else if (result.getCommand().equals(SubmoduleTypeConstant.PETS)){
            battleRoundResponseService.getPetList(conn, result);
        }else if (result.getCommand().equals(SubmoduleTypeConstant.SKILLS)){
            battleRoundResponseService.getSkillList(conn, result);
        }
    }
}
